import { prisma } from "@/lib/prisma"
import { SupplierList } from "@/components/suppliers/supplier-list"
import { SupplierHeader } from "@/components/suppliers/supplier-header"
import { Metadata } from "next"

export const metadata: Metadata = {
  title: "供应商管理 - 商场销售系统",
  description: "供应商管理页面",
}

export default async function SuppliersPage() {
  const suppliers = await prisma.supplier.findMany({
    orderBy: {
      createdAt: 'desc'
    }
  })

  return (
    <div className="space-y-4 p-8">
      <SupplierHeader />
      <SupplierList suppliers={suppliers} />
    </div>
  )
} 